Here we simply extract median RTs for each condition and use a repeated measures ANOVA for statistical analysis, following Kanai et al. (2012).
Data per block
# Compute median in each condition
latencyMedian <- groupDataClean %>%
group_by(subject,stimulation,leg,block,type,direction) %>%
summarise(latency = median(latency, na.rm = TRUE))
Full factorial plot
# Plot out all the data
fullPlot <- ggplot(latencyMedian, aes(interaction(block,leg), latency, color = stimulation, shape = stimulation)) +
facet_grid(type ~ direction) +
stat_summary(fun.y = mean, geom = "point", size = 3) +
stat_summary(fun.y = mean, geom = "line", aes(group = stimulation), size = 1)
fullPlot

There is a pretty sizable difference between the anodal & cathodal sessions in the baseline already: cathodal is always faster than anodal.
The above plot also shows a lot of variability, so it might be best to average over each 3 consecutive blocks so the data come in 15-minute intervals.
15-minute intervals (collapse 3 blocks)
# Compute median per leg
latencyMedianLeg <- groupDataClean %>%
group_by(subject,stimulation,direction,type) %>%
summarise(baseline = median(latency[leg == "pre"], na.rm = TRUE), # take average of 3 blocks, make new column
tDCS = median(latency[leg == "tDCS"], na.rm = TRUE),
post.1 = median(latency[leg == "post" & block <= 3], na.rm = TRUE),
post.2 = median(latency[leg == "post" & block >= 4], na.rm = TRUE)) %>%
gather(leg,latency,baseline,tDCS,post.1,post.2) %>% # gather new columns to use as factor
mutate(leg = factor(leg, levels = c("baseline", "tDCS", "post.1", "post.2"))) # reorder factor levels
Line plot per leg, individual subjects
Now make the same plot, but for the data collapsed over 3 blocks. Also draw the plot for each individual subject, so we can see which subjects drive the baseline difference, and in which direction the stimulation effect goes for each subject (if there is any).
kanaiSubsPlot <- ggplot(latencyMedianLeg, aes(leg, latency, color = stimulation, shape = type)) +
facet_wrap(~subject, nrow = 5) +
stat_summary(fun.y = mean, geom = "point", size = 2) +
stat_summary(fun.y = mean, geom = "line", aes(group = stimulation))
kanaiSubsPlot

There are a couple of subjects that show large differences in the baseline already, especially S01.
Compute magnitude of baseline difference
Let’s look at the size of the baseline difference per subject.
baselineDiff <- latencyMedianLeg %>%
filter(leg == "baseline") %>% # keep only baseline data
spread(stimulation, latency) %>% # make separate columns for anodal and cathodal
mutate(latency.diff = anodal - cathodal) %>% # subtract the difference
group_by(subject) %>%
summarise(latency.diff = mean(latency.diff))# keep the average difference per subject
kable(baselineDiff, caption = 'Difference between baseline saccade latencies in anodal and cathodal session')
| S01 |
39.125 |
| S02 |
18.625 |
| S03 |
2.375 |
| S04 |
-6.125 |
| S05 |
-17.500 |
| S06 |
-3.875 |
| S07 |
5.625 |
| S08 |
11.125 |
| S09 |
23.750 |
| S10 |
14.750 |
| S11 |
1.000 |
| S12 |
8.375 |
| S13 |
4.000 |
| S14 |
-10.375 |
| S15 |
1.875 |
| S16 |
-18.750 |
| S17 |
-5.500 |
| S18 |
-2.875 |
| S19 |
1.000 |
| S20 |
4.750 |
There are a few subjects with substantial latency differences between sessions; the three largest of which are all slower in the anodal session (positive values). The mean difference is 3.6 ms.
Exclude S01 and S16
It seems reasonable to exclude subject 1 from further analysis, because of three things:
- S01 shows the largest baseline difference between the anodal and cathodal sessions.
- Overall, S01 is much slower than all other subjects, by several tens of milliseconds.
- The first session for S01 was aborted because S01 was not feeling well. It was repeated at a later date, so S01 came to the lab 3 times in total instead of two.
However, S01 also seems to show the largest effect of stimulation, for both anodal and cathodal stimulation. It is even in the expected direction: faster saccades than baseline in the anodal session, slower in cathodal.
S16’s data quality was poor in the first session and also shows a large baseline difference
latencyMedianLegExcl <- filter(latencyMedianLeg, subject != "S01") # discard rows from S01
latencyMedianLegExcl$subject <- factor(latencyMedianLegExcl$subject) #remake factor as it now has one level less
Line plot per leg over all subjects
Now that we’ve excluded subject(s) and collapsed data over blocks, let’s look at the group average plot for the first time.
kanaiPlot <- ggplot(latencyMedianLegExcl, aes(leg, latency, color = stimulation, shape = stimulation)) +
facet_grid(type ~ direction) +
stat_summary(fun.y = mean, geom = "point", size = 3) +
stat_summary(fun.y = mean, geom = "line", aes(group = stimulation), size = 1) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar", width = 0.3)
kanaiPlot

Even without S01, there is still a small baseline difference of 1.7 ms. There also seems to be a tiny effect in the center-left saccade condition that’s in the expected direction for both stimulation sessions, but it’s about the size of the baseline difference.
Subtract baseline
The baseline difference is not informative and could obscure real changes from baseline within subjects. Therefore, subtract the baseline from each subsequent measurement.
latencyMedianBaseline <- latencyMedianLegExcl %>%
group_by(subject,stimulation,direction,type) %>% # for each condition, subtract baseline scores and make new columns
summarise(tDCS = latency[leg == "tDCS"] - latency[leg == "baseline"],
post.1 = latency[leg == "post.1"] - latency[leg == "baseline"],
post.2 = latency[leg == "post.2"] - latency[leg == "baseline"]) %>%
gather(leg, latency, tDCS, post.1, post.2) %>% # gather new columns to use as factor
mutate(leg = factor(leg, levels = c("tDCS", "post.1", "post.2"))) # reorder factor levels
Line plots per leg from baseline
kanaiPlotBase <- ggplot(latencyMedianBaseline, aes(leg, latency, color = stimulation, shape = stimulation)) +
facet_grid(type ~ direction) +
geom_hline(yintercept = 0, linetype = "dashed") +
stat_summary(fun.y = mean, geom = "point", size = 3) +
stat_summary(fun.y = mean, geom = "line", aes(group = stimulation), size = 1) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar", width = 0.3) +
coord_cartesian(ylim = c(-15,15))
kanaiPlotBase

All changes from baseline are really tiny: 5 ms or less.
Individual subjects, anodal session
kanaiPlotBaseSubsAnodal <- ggplot(latencyMedianBaseline[latencyMedianBaseline$stimulation == "anodal", ], aes(leg, latency)) +
facet_grid(type ~ direction) +
geom_hline(yintercept = 0, linetype = "dashed") +
geom_line(aes(group=subject,color=subject)) +
stat_summary(fun.y = mean, aes(group = stimulation), geom = "line") +
stat_summary(fun.y = mean, geom = "point") +
ggtitle("Anodal difference from baseline")
kanaiPlotBaseSubsAnodal

For the center saccades, most subjects follow the expected direction and are below the line. The left-lateral effect that is of primary interest is erratic though: only ~10 subjects are below the line, and none show an online-effect larger than 12 ms.
Individual subjects, cathodal session
kanaiPlotBaseSubsCathodal <- ggplot(latencyMedianBaseline[latencyMedianBaseline$stimulation == "cathodal", ], aes(leg, latency)) +
facet_grid(type ~ direction) +
geom_hline(yintercept = 0, linetype = "dashed") +
geom_line(aes(group=subject,color=subject)) +
stat_summary(fun.y = mean, aes(group = stimulation), geom = "line") +
stat_summary(fun.y = mean, geom = "point") +
ggtitle("Cathodal difference from baseline")
kanaiPlotBaseSubsCathodal

All of this is split pretty much 50-50, hence the average difference hovering around 0.
Statistics
T-tests for baseline differences
First, test for baseline differences for each combination of DIRECTION (left, right) and TYPE (center, lateral).
# keep only the baseline for left-lateral-saccades
latencyMedianPreLeftLateral <- latencyMedianLegExcl %>%
filter(leg == "baseline", type == "lateral", direction == "left") %>%
select(-leg,-type,-direction) %>%
spread(stimulation, latency)
Adding missing grouping variables: `direction`
# keep only the baseline for right-lateral-saccades
latencyMedianPreRightLateral <- latencyMedianLegExcl %>%
filter(leg == "baseline", type == "lateral", direction == "right") %>%
select(-leg,-type,-direction) %>%
spread(stimulation, latency)
Adding missing grouping variables: `direction`
# keep only the baseline for right-center-saccades
latencyMedianPreRightCenter <- latencyMedianLegExcl %>%
filter(leg == "baseline", type == "center", direction == "right") %>%
select(-leg,-type,-direction) %>%
spread(stimulation, latency)
Adding missing grouping variables: `direction`
# keep only the baseline for left-center-saccades
latencyMedianPreLeftCenter <- latencyMedianLegExcl %>%
filter(leg == "baseline", type == "center", direction == "left") %>%
select(-leg,-type,-direction) %>%
spread(stimulation, latency)
Adding missing grouping variables: `direction`
t.test(latencyMedianPreLeftLateral$anodal,latencyMedianPreLeftLateral$cathodal, paired = TRUE )
Paired t-test
data: latencyMedianPreLeftLateral$anodal and latencyMedianPreLeftLateral$cathodal
t = 0.59438, df = 18, p-value = 0.5597
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-3.668569 6.563306
sample estimates:
mean of the differences
1.447368
t.test(latencyMedianPreRightLateral$anodal,latencyMedianPreRightLateral$cathodal, paired = TRUE )
Paired t-test
data: latencyMedianPreRightLateral$anodal and latencyMedianPreRightLateral$cathodal
t = 1.299, df = 18, p-value = 0.2104
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-2.290841 9.711893
sample estimates:
mean of the differences
3.710526
t.test(latencyMedianPreLeftCenter$anodal,latencyMedianPreLeftCenter$cathodal, paired = TRUE )
Paired t-test
data: latencyMedianPreLeftCenter$anodal and latencyMedianPreLeftCenter$cathodal
t = 0.22858, df = 18, p-value = 0.8218
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-5.820180 7.241232
sample estimates:
mean of the differences
0.7105263
t.test(latencyMedianPreRightCenter$anodal,latencyMedianPreRightCenter$cathodal, paired = TRUE )
Paired t-test
data: latencyMedianPreRightCenter$anodal and latencyMedianPreRightCenter$cathodal
t = 0.28503, df = 18, p-value = 0.7789
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-5.867854 7.709959
sample estimates:
mean of the differences
0.9210526
None of the baseline differences are significant, so there is reason to leave the baseline data in the rest of the analyses.
Omnibus anova - saccade latency
Data: Outliers removed, collapesed into 15-minute intervals.
Dependent measure: saccadic latency
Factors:
- STIMULATION (anodal vs. cathodal)
- LEG (baseline, tDCS, post.1, post.2)
- TYPE (lateral vs. center)
- DIRECTION (left vs. right)
modelOmni <- ezANOVA(data = data.frame(latencyMedianLegExcl), # Repeated over subjects; type 3 sums of squares (cf. SPSS)
dv = .(latency), wid = .(subject), within = .(stimulation, leg, type, direction), type = 3)
kable(modelOmni$ANOVA)
| 2 |
stimulation |
1 |
18 |
0.5448336 |
0.4699513 |
|
0.0026522 |
| 3 |
leg |
3 |
54 |
0.5719557 |
0.6359004 |
|
0.0010567 |
| 4 |
type |
1 |
18 |
26.5163705 |
0.0000673 |
* |
0.2031419 |
| 5 |
direction |
1 |
18 |
0.0443702 |
0.8355326 |
|
0.0003309 |
| 6 |
stimulation:leg |
3 |
54 |
0.0276830 |
0.9937138 |
|
0.0000243 |
| 7 |
stimulation:type |
1 |
18 |
0.7878197 |
0.3864669 |
|
0.0008186 |
| 8 |
leg:type |
3 |
54 |
2.9395372 |
0.0412563 |
* |
0.0015450 |
| 9 |
stimulation:direction |
1 |
18 |
1.0471920 |
0.3197118 |
|
0.0004897 |
| 10 |
leg:direction |
3 |
54 |
1.1003477 |
0.3570242 |
|
0.0002611 |
| 11 |
type:direction |
1 |
18 |
1.3802333 |
0.2553696 |
|
0.0013139 |
| 12 |
stimulation:leg:type |
3 |
54 |
0.0940556 |
0.9630059 |
|
0.0000290 |
| 13 |
stimulation:leg:direction |
3 |
54 |
4.1363319 |
0.0103488 |
* |
0.0007042 |
| 14 |
stimulation:type:direction |
1 |
18 |
1.8347183 |
0.1923311 |
|
0.0001654 |
| 15 |
leg:type:direction |
3 |
54 |
2.7550809 |
0.0512305 |
|
0.0006159 |
| 16 |
stimulation:leg:type:direction |
3 |
54 |
0.9293330 |
0.4329215 |
|
0.0001384 |
Main effect: type
latencyMedianLegExcl %>%
group_by(subject,type) %>%
summarise(latency = mean(latency)) %>%
ggplot(aes(type, latency)) +
stat_summary(fun.data = mean_cl_normal, size = 1) +
geom_jitter(width = 0.25)

This simply reflects that center saccades are faster than lateral saccades, because the location of the target is known.
Interaction: leg by type
latencyMedianLegExcl %>%
group_by(subject,leg,type) %>%
summarise(latency = mean(latency)) %>%
ggplot(aes(leg, latency, shape = type)) +
stat_summary(fun.y = mean, geom = "point") +
stat_summary(fun.y = mean, geom = "line", aes(group = type, linetype = type))

The effect of TYPE becomes larger over time: center saccades get faster, lateral saccades become slower.
Interaction: leg by type by direction
latencyMedianLegExcl %>%
group_by(subject,leg,type,direction) %>%
summarise(latency = mean(latency)) %>%
ggplot(aes(leg, latency, shape = type)) +
facet_wrap(~direction) +
stat_summary(fun.y = mean, geom = "point") +
stat_summary(fun.y = mean, geom = "line", aes(group = type, linetype = type))

This interaction of LEG and TYPE appears to occur to a lesser extent for left saccades. The “tDCS” block is the deviant here, but there is no interaction with stimulation.
ANOVA matching Kanai et al. (2012) - saccade latency
Differing from the previous omnibus analysis, Kanai et al. (2012) analysed shifts from baseline and only had lateral saccades.
Data:
- Outliers removed
- Collapsed into 15-minute intervals
- Subtract the baseline from each subsequent block
- Discard center, keep only lateral saccades
Dependent measure: saccadic latency
Factors:
- STIMULATION (anodal vs. cathodal)
- LEG (tDCS, post.1, post.2)
- DIRECTION (left vs. right)
latencyMedianBaselineLateral <- filter(latencyMedianBaseline, type == "lateral") # keep only lateral saccades
modelKanai <- ezANOVA(data = data.frame(latencyMedianBaselineLateral),
dv = .(latency), wid = .(subject), within = .(stimulation,leg,direction), type = 3)
# OR, without the EZ package:
# modelKanai=aov(latency~stimulation*leg*direction + Error(subject/(stimulation*leg*direction)),data=latencyMedianBaselineLateral)
# summary(modelKanai)
kable(modelKanai$ANOVA)
| 2 |
stimulation |
1 |
18 |
0.1056396 |
0.7489113 |
|
0.0011603 |
| 3 |
leg |
2 |
36 |
3.0852605 |
0.0579807 |
|
0.0254120 |
| 4 |
direction |
1 |
18 |
0.0006761 |
0.9795419 |
|
0.0000049 |
| 5 |
stimulation:leg |
2 |
36 |
0.0500856 |
0.9512141 |
|
0.0001864 |
| 6 |
stimulation:direction |
1 |
18 |
0.1124817 |
0.7412135 |
|
0.0002421 |
| 7 |
leg:direction |
2 |
36 |
1.6749929 |
0.2015777 |
|
0.0014317 |
| 8 |
stimulation:leg:direction |
2 |
36 |
4.0522338 |
0.0258677 |
* |
0.0060139 |
Main effect of direction
latencyMedianBaselineLateral %>%
group_by(subject,direction) %>%
summarise(latency = mean(latency)) %>%
ggplot(aes(direction, latency)) +
geom_hline(yintercept = 0, linetype = "dashed") +
stat_summary(fun.data = mean_cl_normal, size = 1) +
geom_jitter(width = 0.25)

Right saccades become slower with respect to the baseline; left saccades do not. However, the effect is tiny (1-2 ms) and there is no interaction with STIMULATION.
ANOVA matching Kanai et al. (2012) - center saccades
Repeat the same ANOVA, but now for center saccades (which Kanai did not have).
latencyMedianBaselineCenter <- filter(latencyMedianBaseline, type == "center") # keep only lateral saccades
modelKanaiCenter <- ezANOVA(data = data.frame(latencyMedianBaselineCenter),
dv = .(latency), wid = .(subject), within = .(stimulation,leg,direction), type = 3)
# OR, without the EZ package:
# modelKanai=aov(latency~stimulation*leg*direction + Error(subject/(stimulation*leg*direction)),data=latencyMedianBaselineLateral)
# summary(modelKanai)
kable(modelKanaiCenter$ANOVA)
| 2 |
stimulation |
1 |
18 |
0.0125981 |
0.9118744 |
|
0.0001639 |
| 3 |
leg |
2 |
36 |
0.7986263 |
0.4577571 |
|
0.0027491 |
| 4 |
direction |
1 |
18 |
4.2193901 |
0.0547812 |
|
0.0127626 |
| 5 |
stimulation:leg |
2 |
36 |
0.0519098 |
0.9494854 |
|
0.0001221 |
| 6 |
stimulation:direction |
1 |
18 |
0.0980885 |
0.7577357 |
|
0.0001511 |
| 7 |
leg:direction |
2 |
36 |
1.8879711 |
0.1660644 |
|
0.0025036 |
| 8 |
stimulation:leg:direction |
2 |
36 |
3.2728364 |
0.0494365 |
* |
0.0032078 |
ANOVA without subtracting baseline, for lateral saccades - saccade latency
Kanai et al. analyzed the baseline-subtracted data; now repeat the same ANOVA with the baseline block still present.
Data:
- Outliers removed
- Collapsed into 15-minute intervals
- Discard center, keep only lateral saccades
Dependent measure: saccadic latency
Factors:
- STIMULATION (anodal vs. cathodal)
- LEG (tDCS, post.1, post.2)
- DIRECTION (left vs. right)
# keep only lateral saccades
latencyMedianLateral <- latencyMedianLegExcl %>%
filter(type == "lateral") %>%
select(-type)
modelLateral <- ezANOVA(data = data.frame(latencyMedianLateral),
dv = .(latency), wid = .(subject), within = .(stimulation, leg, direction), type = 3)
kable(modelLateral$ANOVA)
| 2 |
stimulation |
1 |
18 |
1.1896030 |
0.2897954 |
|
0.0057760 |
| 3 |
leg |
3 |
54 |
2.1450309 |
0.1052250 |
|
0.0034252 |
| 4 |
direction |
1 |
18 |
0.3432586 |
0.5652290 |
|
0.0026728 |
| 5 |
stimulation:leg |
3 |
54 |
0.0736893 |
0.9738537 |
|
0.0000562 |
| 6 |
stimulation:direction |
1 |
18 |
1.7519802 |
0.2021940 |
|
0.0011053 |
| 7 |
leg:direction |
3 |
54 |
0.5348350 |
0.6603829 |
|
0.0001691 |
| 8 |
stimulation:leg:direction |
3 |
54 |
3.0084971 |
0.0380553 |
* |
0.0007197 |
Leg by direction interaction
latencyMedianLateral %>%
group_by(subject,leg,direction) %>%
summarise(latency = mean(latency)) %>%
ggplot(aes(leg, latency, shape = direction)) +
stat_summary(fun.y = mean, geom = "point") +
stat_summary(fun.y = mean, geom = "line", aes(group = direction, linetype = direction))

Pretty erratic pattern, and no interaction with STIMULATION either.
ANOVA without subtracting baseline, for center saccades - saccade latency
Same as previous, but now for center saccades.
latencyMedianCenter <- latencyMedianLegExcl %>%
filter(type == "center") %>%
select(-type)
modelCenter <- ezANOVA(data = data.frame(latencyMedianCenter),
dv = .(latency), wid = .(subject), within = .(
stimulation, leg, direction), type = 3)
kable(modelCenter$ANOVA)
| 2 |
stimulation |
1 |
18 |
0.0818013 |
0.7781366 |
|
0.0005891 |
| 3 |
leg |
3 |
54 |
0.4720792 |
0.7030047 |
|
0.0015717 |
| 4 |
direction |
1 |
18 |
0.0399289 |
0.8438598 |
|
0.0003658 |
| 5 |
stimulation:leg |
3 |
54 |
0.0290943 |
0.9932360 |
|
0.0000499 |
| 6 |
stimulation:direction |
1 |
18 |
0.2061376 |
0.6552385 |
|
0.0000962 |
| 7 |
leg:direction |
3 |
54 |
2.7402193 |
0.0521336 |
|
0.0017524 |
| 8 |
stimulation:leg:direction |
3 |
54 |
2.3794025 |
0.0797697 |
|
0.0009944 |
Bayesian linear mixed effects matching Kanai - saccade latency
Test against the null model
bfKanaiNull = anovaBF(latency~stimulation*leg*direction+subject, data = data.frame(latencyMedianBaselineLateral), whichModels="withmain", whichRandom = "subject", progress = FALSE, iterations = 100000) # compute Bayes Factors
bfKanaiNull = sort(bfKanaiNull, decreasing = TRUE) # sort such that winning model is at the top
First we compare all models to the most simple (null) model, which is the intercept only + random effect model: latency ~ subject. This does not test for effects of SUBJECT but models it as a nuisance factor (whichRandom = "subject"). In addition, to decrease the model space, we do not consider models that have an interaction without the corresponding main effects (whichModels = "withmain").
kable(select(extractBF(bfKanaiNull), bf)) # show only the Bayes factors in a table
| leg + subject |
1.9394726 |
| stimulation + leg + subject |
0.3327031 |
| direction + leg + subject |
0.2801473 |
| stimulation + subject |
0.1716592 |
| direction + subject |
0.1427363 |
| stimulation + direction + leg + subject |
0.0479931 |
| stimulation + leg + stimulation:leg + subject |
0.0279650 |
| direction + leg + direction:leg + subject |
0.0273854 |
| stimulation + direction + subject |
0.0243691 |
| stimulation + direction + stimulation:direction + leg + subject |
0.0095508 |
| stimulation + direction + stimulation:direction + subject |
0.0052792 |
| stimulation + direction + leg + direction:leg + subject |
0.0047485 |
| stimulation + direction + leg + stimulation:leg + subject |
0.0039681 |
| stimulation + direction + stimulation:direction + leg + direction:leg + subject |
0.0009712 |
| stimulation + direction + stimulation:direction + leg + stimulation:leg + subject |
0.0008092 |
| stimulation + direction + leg + stimulation:leg + direction:leg + subject |
0.0003951 |
| stimulation + direction + stimulation:direction + leg + stimulation:leg + direction:leg + subject |
0.0000795 |
| stimulation + direction + stimulation:direction + leg + stimulation:leg + direction:leg + stimulation:direction:leg + subject |
0.0000229 |
The winning model is the one with all main effects, with a Bayes factor of 1.9. We can compute the evidence for a particular effect by comparing this winning model with the best-fitting model that does not contain the effect. We can compute the evidence for absence of a particular effect by comparing the winning model with the best-fitting model that does contain the effect.
- STIMULATION. This effect can be quantified by comparing the Bayes factors of the first and the 3rd model : 6.9. This constitues moderate evidence for the presence of a stimulation effect.
DIRECTION. This effect can be quantified by comparing the first and the 2nd model : 5.8. This constitues anecdotal evidence for the presence of a direction effect.
- Interaction of STIMULATION and DIRECTION. This term is not in the winning model, and first shows up in the fourth model. The Bayes factor for the comparison of both models is 11.3. This constitues moderate evidence for the absence of an interaction between stimulation and direction.
- Interaction of STIMULATION, and LEG. Bayes factor: 70.8. This constitutes moderate evidence for the absence of an interaction between stimulation and leg.
Three-way interaction. Bayes factor: 8.4607710^{4}. This constitutes strong evidence for the absence of an interaction between stimulation, leg and direction.
Test against the full model
Another option for quantifying evidence for a particular effect is to compare the full model to a model where that effect is omitted (whichModels = top"). The full model is stimulation + direction + stimulation:direction + leg + stimulation:leg + direction:leg + stimulation:direction:leg + subject.
bfKanaiFull = anovaBF(latency~stimulation*leg*direction+subject, data = data.frame(latencyMedianBaselineLateral), whichModels="top", whichRandom = "subject", progress = FALSE, iterations = 100000) # compute Bayes Factors
bfKanaiFull
Bayes factor top-down analysis
--------------
When effect is omitted from stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject , BF is...
[1] Omit direction:leg:stimulation : 3.531213 <U+00B1>2.8%
[2] Omit direction:leg : 9.958357 <U+00B1>2.39%
[3] Omit leg:stimulation : 12.17389 <U+00B1>2.93%
[4] Omit direction:stimulation : 5.00078 <U+00B1>2.83%
[5] Omit leg : 0.5059081 <U+00B1>2.83%
[6] Omit direction : 7.274857 <U+00B1>2.61%
[7] Omit stimulation : 5.96352 <U+00B1>3.1%
Against denominator:
latency ~ stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject
---
Bayes factor type: BFlinearModel, JZS
Removing the DIRECTION effect from the model yields a lower Bayes Factor, so including this effect improved the model. This thus constitues (some) evidence for the alternative: 1 \ 7.275 = 0.1. The evidence for a stimulation effect is also about the same: 0.2.
On the contrary, removing the interactions actually improves the model, so there is moderate evidence for the absence of interaction effects.
All in all, for most effects, the result is qualitatively similar to the approach of testing against the null-model. Only the evidence for absence of the three-way interaction is much, much smaller here.
Bayesian linear mixed effects matching Kanai - center saccades
bfKanaiCenter = anovaBF(latency~stimulation*leg*direction+subject, data = data.frame(latencyMedianBaselineCenter), whichModels="top", whichRandom = "subject", progress = FALSE, iterations = 100000) # compute Bayes Factors
bfKanaiCenter
Bayes factor top-down analysis
--------------
When effect is omitted from stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject , BF is...
[1] Omit direction:leg:stimulation : 4.287449 <U+00B1>3.81%
[2] Omit direction:leg : 7.782446 <U+00B1>2.85%
[3] Omit leg:stimulation : 12.15958 <U+00B1>3.32%
[4] Omit direction:stimulation : 5.243033 <U+00B1>4.65%
[5] Omit leg : 18.55041 <U+00B1>33.29%
[6] Omit direction : 1.008738 <U+00B1>46.93%
[7] Omit stimulation : 6.57132 <U+00B1>2.11%
Against denominator:
latency ~ stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject
---
Bayes factor type: BFlinearModel, JZS
Bayesian linear mixed effects with baseline - saccade latency
Repeat the analysis when the baseline is not subtracted, and also for center saccades.
Lateral saccades
# keep only lateral saccades
latencyMedianLateral <- latencyMedianLegExcl %>%
filter(type == "lateral") %>%
select(-type)
bfLateral = anovaBF(latency~stimulation*leg*direction+subject, data = data.frame(latencyMedianLateral), whichModels="top", whichRandom = "subject", progress = FALSE, iterations = 100000) # compute Bayes Factors
bfLateral
Bayes factor top-down analysis
--------------
When effect is omitted from stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject , BF is...
[1] Omit direction:leg:stimulation : 11.40207 <U+00B1>2.12%
[2] Omit direction:leg : 28.10296 <U+00B1>1.9%
[3] Omit leg:stimulation : 28.90428 <U+00B1>1.76%
[4] Omit direction:stimulation : 3.637222 <U+00B1>1.88%
[5] Omit leg : 17.51425 <U+00B1>3.04%
[6] Omit direction : 2.407894 <U+00B1>1.74%
[7] Omit stimulation : 0.5932669 <U+00B1>3.19%
Against denominator:
latency ~ stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject
---
Bayes factor type: BFlinearModel, JZS
When including the baseline, the evidence for null effects are stronger all around.
Center saccades
# keep only center saccades
latencyMedianCenter <- latencyMedianLegExcl %>%
filter(type == "center") %>%
select(-type)
bfCenter = anovaBF(latency~stimulation*leg*direction+subject, data = data.frame(latencyMedianCenter), whichModels="top", whichRandom = "subject", progress = FALSE, iterations = 100000) # compute Bayes Factors
bfCenter
Bayes factor top-down analysis
--------------
When effect is omitted from stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject , BF is...
[1] Omit direction:leg:stimulation : 11.78923 <U+00B1>4.91%
[2] Omit direction:leg : 19.688 <U+00B1>5.21%
[3] Omit leg:stimulation : 31.49381 <U+00B1>7.63%
[4] Omit direction:stimulation : 5.853747 <U+00B1>2.62%
[5] Omit leg : 44.50356 <U+00B1>2.83%
[6] Omit direction : 7.08912 <U+00B1>1.9%
[7] Omit stimulation : 6.663299 <U+00B1>1.74%
Against denominator:
latency ~ stimulation + direction + leg + stimulation:direction + stimulation:leg + direction:leg + stimulation:direction:leg + subject
---
Bayes factor type: BFlinearModel, JZS
Now the model improves all the time, no matter which effect is omitted.